import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_module/base/model/constants.dart';
import 'package:flutter_module/router/routers.dart';
import 'package:get/get.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("首页"),
        backgroundColor: Theme.of(context).scaffoldBackgroundColor,
        centerTitle: true,
        shadowColor: Colors.transparent,
      ),
      body: Column(
        children: [
          Text("点击一下"),
          GestureDetector(
            onTap: () => openPage(),
            child: Text("跳转页面"),
          )
        ],
      ),
    );
  }

  void openPage() {
    Get.updateLocale(const Locale('en', 'US'));
    // BoostNavigator.instance.push(RouteGet.web, arguments: {Constants.url: "https://blog.csdn.net/the_shy_faker/article/details/138174982"});
  }
}
